
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>你讲一下JVM的组成部分吗 - 学习卡片</title>
      <style>
        body { font-family: sans-serif; background-color: #f0f8ff; color: #333; display: flex; flex-direction: column; align-items: center; padding: 50px 20px; }
        .header h1 { font-size: 32px; }
        .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; max-width: 1200px; }
        .card-container { perspective: 1200px; cursor: pointer; height: 250px; }
        .card { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.7s; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
        .card-container.flipped .card { transform: rotateY(180deg); }
        .card-face { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; box-sizing: border-box; border-radius: 16px; background-color: #fff; padding: 24px; }
        .card-back { background-color: #f0fff4; transform: rotateY(180deg); justify-content: space-between; }
        .card-category { font-size: 14px; color: #0052d9; margin-bottom: 8px; font-weight: 500; }
        .card-question { font-size: 20px; font-weight: 500; flex-grow: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
        .card-answer-wrapper { flex-grow: 1; overflow-y: auto; }
        .card-answer { font-size: 15px; line-height: 1.7; }
        .card-footer { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 16px; margin-top: 16px; }
        .card-source { font-size: 13px; color: #8a919f; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 12px; }
      </style>
    </head>
    <body>
      <div class="header">
        <h1>你讲一下JVM的组成部分吗 - 学习卡片</h1>
      </div>
      <div class="grid-container">
        
    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">JVM的类加载器子系统在将字节码文件转换为JVM内部表示时，主要包含哪三个功能阶段？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">类加载器子系统的主要功能阶段包括：加载（Loading）、链接（Linking）和初始化（Initialization）。</div>
          </div>
          <div class="card-source">来源: 1. 类加载器子系统（Class Loader Subsystem）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">JVM的运行时数据区中，虚拟机栈（Java Virtual Machine Stack）主要用于存储什么信息？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">虚拟机栈用于存储方法调用时的局部变量、操作数栈、动态链接、返回地址等信息。每个方法的调用都会创建一个栈帧。</div>
          </div>
          <div class="card-source">来源: 2. 运行时数据区（Runtime Data Areas）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">JVM的堆（Heap）的核心作用是什么，并且它通常被如何划分？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">堆（Heap）用于存储Java对象和数组，是垃圾回收的主要区域。堆的内存被划分为年轻代（Young Generation）和老年代（Old Generation）。</div>
          </div>
          <div class="card-source">来源: 2. 运行时数据区（Runtime Data Areas）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">特性</div>
          <div class="card-question">从JDK 8开始，JVM的方法区（Method Area）发生了什么重要变化？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">特性</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">从JDK 8之后，方法区被Metaspace（元空间）所替代。Metaspace使用本地内存而不是虚拟机堆来存储类的元数据。</div>
          </div>
          <div class="card-source">来源: 2. 运行时数据区（Runtime Data Areas）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">JVM执行引擎中的解释器（Interpreter）和即时编译器（JIT）在执行字节码时有何核心区别？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">解释器逐条解释字节码指令并执行，优点是启动快，但执行效率相对较低。而即时编译器（JIT）会将热点代码编译为本地机器码，以显著提高后续调用的执行性能。</div>
          </div>
          <div class="card-source">来源: 3. 执行引擎（Execution Engine）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">什么是Java本地接口（JNI），它的主要用途是什么？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">JNI (Java Native Interface) 是JVM提供的一个接口，它允许Java代码与用其他编程语言（如C/C++）编写的本地代码进行交互。</div>
          </div>
          <div class="card-source">来源: 4. 本地接口（Native Interface）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">机制</div>
          <div class="card-question">在JVM的类加载过程中，“链接（Linking）”这一阶段具体包含哪三个步骤？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">机制</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">链接阶段分为三个主要步骤：验证（Verification）、准备（Preparation）和解析（Resolution）。</div>
          </div>
          <div class="card-source">来源: 1. 类加载器子系统（Class Loader Subsystem）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">JVM中的垃圾回收器（Garbage Collector）的核心职责是什么？</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">垃圾回收器的核心职责是自动管理内存，通过回收不再被程序使用的对象来释放内存空间。</div>
          </div>
          <div class="card-source">来源: 3. 执行引擎（Execution Engine）</div>
        </div>
      </div>
    </div>

    <div class="card-container" onclick="this.classList.toggle('flipped');">
      <div class="card">
        <div class="card-face card-front">
          <div class="card-category">技术</div>
          <div class="card-question">请列举至少三个JVM提供的用于监控、分析和调试的命令行工具。</div>
          <div class="card-footer">点击卡片查看答案</div>
        </div>
        <div class="card-face card-back">
          <div class="card-category">技术</div>
          <div class="card-answer-wrapper">
            <div class="card-answer">文档中提到的JVM命令行工具有：jps、jstat、jstack、jmap、jcmd。</div>
          </div>
          <div class="card-source">来源: 5. 调试和监控工具</div>
        </div>
      </div>
    </div>

      </div>
    </body>
    </html>
